projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
902a49a
)
main: Use gdk_surface_translate_coordinates
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 29 May 2019 03:43:05 +0000
(23:43 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 29 May 2019 18:04:08 +0000
(18:04 +0000)
This gets rid of another use of global coordinates.
gtk/gtkmain.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmain.c
b/gtk/gtkmain.c
index 71b1dce79b0feb847c632453107600e4b297b411..c57c09e70e9e2298e3e27f5b99ae12cbd3f645b1 100644
(file)
--- a/
gtk/gtkmain.c
+++ b/
gtk/gtkmain.c
@@
-1216,14
+1216,11
@@
rewrite_events_translate (GdkSurface *old_surface,
gdouble *x,
gdouble *y)
{
- gint old_origin_x, old_origin_y;
- gint new_origin_x, new_origin_y;
-
- gdk_surface_get_origin (old_surface, &old_origin_x, &old_origin_y);
- gdk_surface_get_origin (new_surface, &new_origin_x, &new_origin_y);
-
- *x += old_origin_x - new_origin_x;
- *y += old_origin_y - new_origin_y;
+ if (!gdk_surface_translate_coordinates (old_surface, new_surface, x, y))
+ {
+ *x = 0;
+ *y = 0;
+ }
}
static GdkEvent *